import request from '@/utils/request'

// 查询挂号预约列表
export function listConvention(query) {
  return request({
    url: '/system/convention/list',
    method: 'get',
    params: query
  })
}

// 查询挂号预约详细
export function getConvention(id) {
  return request({
    url: '/system/convention/' + id,
    method: 'get'
  })
}

// 新增挂号预约
export function addConvention(data) {
  return request({
    url: '/system/convention',
    method: 'post',
    data: data
  })
}

// 修改挂号预约
export function updateConvention(data) {
  return request({
    url: '/system/convention',
    method: 'put',
    data: data
  })
}

// 删除挂号预约
export function delConvention(id) {
  return request({
    url: '/system/convention/' + id,
    method: 'delete'
  })
}

// 查询级联科室
export function selectDeptTrees() {
  return request({
    url: '/system/department/tree',
    method: 'get'
  })
}

// 查询全部医生
export function findDockers() {
  return request({
    url: '/system/docker/selectAll',
    method: 'get'
  })
}

// 查询全部用户
export function findUsers() {
  return request({
    url: '/system/hosUser/selectAll',
    method: 'get'
  })
}

// 查询全部类型
export function findTypes() {
  return request({
    url: '/system/type/selectAll',
    method: 'get'
  })
}

// 查询全部患者
export function findPatients() {
  return request({
    url: '/system/patient/selectAll',
    method: 'get'
  })
}

// 查询全部时间段
export function findTimes() {
  return request({
    url: '/system/period/selectAll',
    method: 'get'
  })
}
